package hcn.protocol.brandnew.zhenliao.jiluxinxi;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import org.atag.sysrouter.annotation.DictionaryMapping;


/**
 * 待发药纪录查询 - ODS_03140001
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class QueryUndeliveredDrugsRequest extends BaseRequest {

    /**
     * 查询组合类型
     */
    @XmlElement(name = "QueryType")
    private String queryType;
    /**
     * 就诊医疗机构组织机构代码
     */
    @XmlElement(name = "VisitOrganization")
    private String visitOrganization;
    /**
     * 处方/医嘱状态
     */
    @XmlElement(name = "PrescriptionState")
    private String prescriptionState;
    /**
     * 证件集合
     */
    @XmlElementWrapper(name = "IdCardLists")
    @XmlElement(name = "IdCardList")
    private List<IdCardList> idCardLists;
    /**
     * 患者卡列表
     */
    @XmlElementWrapper(name = "MedicalCardLists")
    @XmlElement(name = "MedicalCardList")
    private List<MedicalCardList> medicalCardLists;
    /**
     * 患者标识集合
     */
    @XmlElementWrapper(name = "SourcePatientIdLists")
    @XmlElement(name = "SourcePatientIdList")
    private List<SourcePatientIdList> sourcePatientIdLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class IdCardList {

        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MedicalCardList {

        /**
         * 患者卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 诊疗卡类型
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class SourcePatientIdList {

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
    }

}
